package com.huawei.classroom.student.h17;

public class GameBase extends GameObject{
	public GameBase(Player player, int x, int y) {
		super(player, x, y, BattleField.getread_ini("base.range"), BattleField.getread_ini("base.strength"), BattleField.getread_ini("base.health"));
	}
	
	public GameObject building(EnumObjectType type, int x, int y) {//建角色
		GameObject gameObject = null;
		if (type == EnumObjectType.barrack) {
			gameObject = new Barrack(getplayer(), x, y);
		}
		else if(type == EnumObjectType.warFactory) {
			gameObject = new WarFactory(getplayer(), x, y);
		}
		else return gameObject;
		BattleField.gameObjects.add(gameObject);
		return gameObject;
	}
}
